package com.hmdp.controller;


import com.hmdp.entity.dto.Result;
import com.hmdp.service.IFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 虎哥
 * @since 2021-12-22
 */
@RestController
@RequestMapping("/follow")
public class FollowController {
    @Autowired
    IFollowService followService;
    @PutMapping("/{id}/{flag}")
    public Result concern(@PathVariable Long id,Boolean flag)
    {
        return followService.concern(id);
    }
    @GetMapping("/or/not/{id}")
    public Result  orNot(@PathVariable Long id)
    {
        return followService.orNot(id);
    }
    @GetMapping("/common/{id}")
    public Result common(@PathVariable Long id)
    {
        return followService.common(id);
    }


}
